using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI.Design;
using System.Web.UI.WebControls;

namespace VeryCodes.Controls.Web
{
    public class WebControlsDesigner : ControlDesigner
    {
        public override string GetDesignTimeHtml()
        {
            WebControl ctrl = (WebControl)this.Component;
            StringBuilder sb = new StringBuilder();
            sb.AppendFormat(
                "<span style=\"display:block; align:center; valign:middle; font-size:small; font-family: Arial; background-color: #eeeeee; padding:2px; border: #cccccc dotted 2px; width:{0}; height:{1};\"><center>{2}</center></span>",
                ctrl.Width,
                ctrl.Height,
                ctrl.ID);
            return sb.ToString();
        }

        public override bool AllowResize
        {
            get { return false; }
        }
    }
}